package com.client;

import com.message.resp.GroupChatResp;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * 接受并显示群聊消息
 */
public class ReceiveGroupChatHandler extends SimpleChannelInboundHandler<GroupChatResp> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, GroupChatResp msg) throws Exception {

        System.out.printf("【%s】组的【%s】说：%s\n",msg.getGroupName(),msg.getFromUserName(),msg.getContent());

    }
}
